<script>
export default {
  name: 'MyNews',
  data() {
    return {
      newsList: [
        {"id":1,"title":"新闻一"},
        {"id":2,"title":"新闻二"},
        {"id":3,"title":"新闻三"}
      ]
    }
  }
}
</script>

<template>
  <div>
    <ul>
      <li v-for="n in newsList" :key="n.id">
        <router-link :to="{
        name:'test',
        params:{
          id:n.id,
          title:n.title
        }
      }">
          {{n.title}}</router-link>
      </li>
    </ul>
    <router-view></router-view>
  </div>
</template>